package com.meta.internal;

import com.meta.builder.IMetaTemplate;
import freemarker.template.Configuration;

import javax.annotation.processing.ProcessingEnvironment;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 元数据配置项
 */
public class Options {
    /**
     * 类型判定标识
     */
    private String typeTip;
    /**
     * 属性判定标识
     */
    private String propertiesTip;
    private ProcessingEnvironment processingEnv;
    private Configuration fkConfig;
    public static List<String> defaultImports = new ArrayList<>() {{
        add("import lombok.Data;");
        add("import java.util.List;");
    }};
    private Map<String, IMetaTemplate> templates = new HashMap<>();

    //--------source---------
    private String sourceType;

    public Options() {
    }

    public Options(ProcessingEnvironment processingEnv) {
        this.processingEnv = processingEnv;
    }

    public ProcessingEnvironment getProcessingEnv() {
        return processingEnv;
    }

    public Configuration getFkConfig() {
        return fkConfig;
    }

    public void setFkConfig(Configuration fkConfig) {
        this.fkConfig = fkConfig;
    }

    public void setProcessingEnv(ProcessingEnvironment processingEnv) {
        this.processingEnv = processingEnv;
    }

    public String getTypeTip() {
        return typeTip;
    }

    public void setTypeTip(String typeTip) {
        this.typeTip = typeTip;
    }

    public String getPropertiesTip() {
        return propertiesTip;
    }

    public void setPropertiesTip(String propertiesTip) {
        this.propertiesTip = propertiesTip;
    }

    public String getSourceType() {
        return sourceType;
    }

    public Map<String, IMetaTemplate> getTemplates() {
        return templates;
    }

    public void setTemplates(Map<String, IMetaTemplate> templates) {
        this.templates = templates;
    }

    public void setSourceType(String sourceType) {
        this.sourceType = sourceType;
    }
}
